Skip to main content
POST
/
action
/
heygen_avatar_generate_video
[HG1] Generate Avatar Video
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/heygen_avatar_generate_video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_type": "blog_url",
  "aspect_ratio": "landscape",
  "avatar_name": "sawyer",
  "output_variable_name": "heygen_result",
  "blog_url": "<string>",
  "topic": "<string>",
  "content_type": "blog_summary",
  "expression": "default",
  "circle_style": false,
  "background_color": "#FFFFFF"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
source_type
enum<string>
default:blog_url
required

How to generate the video script.

Available options:
blog_url,
topic_or_script
aspect_ratio
enum<string>
default:landscape
required
Available options:
landscape,
portrait
avatar_name
enum<string>
default:sawyer
required
Available options:
sawyer,
gabrielle,
denyse,
kaitlyn,
asher,
chukwu,
araj,
declan,
nevaeh,
youssef
output_variable_name
string
default:heygen_result
required

Variable name for result. Access fields with {{heygen_result.video_id}}, {{heygen_result.title}}, {{heygen_result.script}}.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
blog_url
string

URL of blog post to scrape (required when source_type is blog_url).

topic
string

Topic idea or full script text (required when source_type is topic_or_script).

content_type
enum<string>
default:blog_summary

Video style when using blog URL source.

Available options:
blog_summary,
blog_promotion
expression
enum<string>
default:default
Available options:
default,
happy
circle_style
boolean
default:false

Apply circle mask to avatar.

background_color
string
default:#FFFFFF

Hex color for video background (e.g. #FFFFFF).

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action